<template>
    <div class="demo">
        <h2 >学校名称:{{name}}</h2>
        <h2>学校地址:{{address}}</h2>
    </div>
</template>
<script>
export default {
    name: 'StuSchool',
    data () {
        return {
            name: 'wqewqe',
            address: 'zxcxzcx'
        }
    },
    mounted () {
        this.$bus.$on('hello', (data) => {
            console.log('我是school组件,收到了数据',data)
        })
    }
}
</script>
<style lang="less" scoped>
    .demo {
        background-color: orange;
        padding: 5px;
        h2 {
            color: red;
        }
    }
</style>